<!-- 任务委托项目报表 -->
<template>
  <view>
    <u-sticky>
      <u-tabs
        class="tabs"
        :list="tabsList"
        @click="onTabClick"
        :scrollable="true"
        style="padding: 0 24rpx; background: #fff; z-index: 22; position: sticky; top: 0px"
        :activeStyle="{ color: '#171717', fontSize: '14px' }"
        :inactiveStyle="{ color: '#C6C6C6', fontSize: '14px' }"
        :itemStyle="{ whiteSpace: 'nowrap', height: '44px' }"
        lineColor="#1E6FFF"
      ></u-tabs>
    </u-sticky>
    <view class="task_lists" :style="{ paddingBottom: tabvalue == '待办' ? '130rpx' : '0' }">
      <collapse name="基本信息" id="outside1" :maxHeight="maxHeight1">
        <view class="listdefault" :id="uId1">
          <view class="action">
            <view class="list1">单据编号</view>
            <view class="list2">{{ detailData.billNo }}</view>
          </view>
          <view class="action">
            <view class="list1">申请时间</view>
            <view class="list2">{{ detailData.createTime }}</view>
          </view>
          <view class="action">
            <view class="list1">申请人</view>
            <view class="list2">{{ filterMultiDictText(dictOptions['handlerId'], detailData.handlerId + '') }}</view>
          </view>
          <view class="action">
            <view class="list1">申请部门</view>
            <view class="list2">{{ filterMultiDictText(dictOptions['handlerDeptId'], detailData.handlerDeptId + '') }}</view>
          </view>
        </view>
      </collapse>
      <collapse name="项目信息" id="outside2" :maxHeight="maxHeight2">
        <view class="listdefault" :id="uId2">
          <view class="action">
            <view class="list1">项目名称</view>
            <view class="list2">{{ detailData.projectName }}</view>
          </view>
          <view class="action">
            <view class="list1">项目编号</view>
            <view class="list2">{{ detailData.finalNo }}</view>
          </view>
          <view class="action">
            <view class="list1">经营团队</view>
            <view class="list2">{{ filterMultiDictText(dictOptions['teamName'], detailData.teamName + '') }}</view>
          </view>
          <view class="action">
            <view class="list1">项目承接人</view>
            <view class="list2">{{ filterMultiDictText(dictOptions['undertaker'], detailData.undertaker + '') }}</view>
          </view>
          <view class="action">
            <view class="list1">立项日期</view>
            <view class="list2">{{ detailData.projectEstablishDate }}</view>
          </view>
          <view class="action">
            <view class="list1">签订单位</view>
            <view class="list2">{{ filterMultiDictText(dictOptions['signUnit'], detailData.signUnit + '') }}</view>
          </view>
          <view class="action">
            <view class="list1">业绩归属年度</view>
            <view class="list2">{{ detailData.year }}</view>
          </view>
          <view class="action">
            <view class="list1">业主单位</view>
            <view class="list2">{{ filterMultiDictText(dictOptions['ownerUnit'], detailData.ownerUnit + '') }}</view>
          </view>
          <view class="action">
            <view class="list1">联系人</view>
            <view class="list2">{{ filterMultiDictText(dictOptions['contacts'], detailData.contacts + '') }}</view>
          </view>
          <view class="action">
            <view class="list1">联系方式</view>
            <view class="list2">{{ detailData.contactTel }}</view>
          </view>
          <view class="action">
            <view class="list1">项目所在地址</view>
            <view class="list2">{{ detailData.addressDetail }}</view>
          </view>
          <view class="action">
            <view class="list1">项目来源</view>
            <view class="list2">{{ filterMultiDictText(dictOptions['projectSource'], detailData.projectSource + '') }}</view>
          </view>
          <view class="action">
            <view class="list1">预计合同额(元)</view>
            <view class="list2">{{ detailData.estimatedContractAmount }}</view>
          </view>
          <view class="action">
            <view class="list1">预计合同额大写</view>
            <view class="list2">{{ detailData.estimatedContractcapitalChineseAmount }}</view>
          </view>
          <view class="action">
            <view class="list1">立项事由及说明</view>
            <view class="list2">{{ detailData.establishReason }}</view>
          </view>
        </view>
      </collapse>
      <collapse name="任务信息" id="outside3" :maxHeight="maxHeight3">
        <view class="listdefault" :id="uId3">
          <view class="action">
            <view class="list1">任务编号</view>
            <view class="list2">{{ detailData.taskNo }}</view>
          </view>
          <view class="action">
            <view class="list1">业务分类</view>
            <view class="list2">{{ detailData.categoryName }}</view>
          </view>
          <view class="action">
            <view class="list1">合同占比(%)</view>
            <view class="list2">{{ detailData.contractRate }}</view>
          </view>
          <view class="action">
            <view class="list1">合同分配额(元)</view>
            <view class="list2">{{ detailData.contractAmount }}</view>
          </view>
          <view class="action">
            <view class="list1">生产团队</view>
            <view class="list2">{{ filterMultiDictText(dictOptions['productTeam'], detailData.productTeam + '') }}</view>
          </view>
          <view class="action">
            <view class="list1">任务类型</view>
            <view class="list2">{{ filterMultiDictText(dictOptions['taskType'], detailData.taskType + '') }}</view>
          </view>
          <view class="action">
            <view class="list1">实施部门</view>
            <view class="list2">{{ filterMultiDictText(dictOptions['executeDepart'], detailData.executeDepart + '') }}</view>
          </view>
          <view class="action">
            <view class="list1">部门负责人</view>
            <view class="list2">{{ filterMultiDictText(dictOptions['minister'], detailData.minister + '') }}</view>
          </view>
          <view class="action">
            <view class="list1">项目负责人</view>
            <view class="list2">{{ filterMultiDictText(dictOptions['projectLeading'], detailData.projectLeading + '') }}</view>
          </view>
          <template v-if="detailData.taskType == 1 || detailData.taskType == 4">
            <view class="action" v-if="detailData.taskType == 1">
              <view class="list1">审核工程师</view>
              <view class="list2">{{ filterMultiDictText(dictOptions['approvalEngineer'], detailData.approvalEngineer + '') }}</view>
            </view>
            <view class="action">
              <view class="list1">审批级别</view>
              <view class="list2">{{ filterMultiDictText(dictOptions['approvalLevel'], detailData.approvalLevel + '') }}</view>
            </view>
            <view class="action">
              <view class="list1">审批系数</view>
              <view class="list2">{{ detailData.approvalCoefficient }}</view>
            </view>
            <view class="action">
              <view class="list1">行业类别</view>
              <view class="list2">{{ filterMultiDictText(dictOptions['industryCategory'], detailData.industryCategory + '') }}</view>
            </view>
            <view class="action">
              <view class="list1">行业系数</view>
              <view class="list2">{{ detailData.industryCoefficient }}</view>
            </view>
            <view class="action">
              <view class="list1">复杂程度</view>
              <view class="list2">{{ filterMultiDictText(dictOptions['complexity'], detailData.complexity + '') }}</view>
            </view>
            <view class="action">
              <view class="list1">复杂系数</view>
              <view class="list2">{{ detailData.complexCoefficient }}</view>
            </view>
          </template>
          <template v-if="detailData.taskType == 2">
            <view class="action">
              <view class="list1">是否出具报告</view>
              <view class="list2">{{ filterMultiDictText(dictOptions['isOutReport'], detailData.isOutReport + '') }}</view>
            </view>
            <view class="action">
              <view class="list1">费用核算方式</view>
              <view class="list2">
                {{ filterMultiDictText(dictOptions['expenseAccountingMethod'], detailData.expenseAccountingMethod + '') }}
              </view>
            </view>
          </template>
          <view class="action">
            <view class="list1">说明</view>
            <view class="list2">{{ detailData.instruction }}</view>
          </view>
        </view>
      </collapse>
      <action-collapse name="项目成员" :childFields="childFields" id="outside4" :dataSource="childArr"></action-collapse>
      <collapse name="项目预算" id="outside5" :maxHeight="maxHeight4">
        <view class="listdefault" :id="uId4">
          <view class="action">
            <view class="list1">预算总工时(人天)</view>
            <view class="list2">{{ detailData.expectWorkTime }}</view>
          </view>
          <view class="action">
            <view class="list1">人工总成本(元)</view>
            <view class="list2">{{ detailData.workCost }}</view>
          </view>
          <view class="action">
            <view class="list1">委外费(元)</view>
            <view class="list2">{{ detailData.outsourcingFee }}</view>
          </view>
          <view class="action">
            <view class="list1">差旅费(元)</view>
            <view class="list2">{{ detailData.travelFee }}</view>
          </view>
          <view class="action">
            <view class="list1">专家评审费(元)</view>
            <view class="list2">{{ detailData.professionReviewFee }}</view>
          </view>
          <view class="action">
            <view class="list1">其他成本(元)</view>
            <view class="list2">{{ detailData.otherCost }}</view>
          </view>
          <view class="action">
            <view class="list1">项目预算合计(元)</view>
            <view class="list2">{{ detailData.totalProjectBudget }}</view>
          </view>
        </view>
      </collapse>
      <action-collapse name="任务进度" :childFields="childProgressFields" id="outside6" :dataSource="progressVoList">
        <view class="action" slot="handler" style="border-bottom: 1px solid #e5e5e5; padding: 10rpx 0; margin: 0 20rpx">
          <view class="list1">进度模板</view>
          <view class="list2">{{ detailData.templateName }}</view>
        </view>
      </action-collapse>
      <action-collapse
        name="款项进度"
        :childFields="childProgressNodeFields"
        id="outside7"
        :dataSource="progressNodeVoList"
      ></action-collapse>

      <default-list name="项目附件">
        <file-list :fileList="detailData.attachment"></file-list>
      </default-list>
      <default-list name="任务附件">
        <file-list :fileList="detailData.taskFile"></file-list>
      </default-list>
      <default-list name="流程图" id="outside8">
        <template slot="right">
          <view class="flow_right" @click="flowView">
            <image src="../../static/synergy/viewflow.png" mode="aspectFill"></image>
            <text>流程图</text>
          </view>
        </template>
        <flow-list :dataSource="resultList"></flow-list>
      </default-list>
    </view>
    <u-toast ref="uToast"></u-toast>
  </view>
</template>
<script>
import actionCollapse from '@/pages/synergy/components/actionCollapse.vue'
import address from '@/utils/address.js'
import http from '@/utils/request'
import detailInformationList from '@/pages/synergy/components/detailInformationList.vue'
import fileList from '@/pages/synergy/components/fileList.vue'
import collapse from '@/pages/synergy/components/collapse.vue'
import defaultList from '@/pages/synergy/components/defaultList.vue'
import flowList from '@/pages/synergy/components/flowList.vue'
import { filterMultiDictText, initDictOptions } from '@/utils/JDictSelectUtil.js'
import {
  erpOmcTaskDistributionId, // 根据id查询任务委托详情
  erpOmcProjectId, // 获取项目详情
  erpOmcTaskDistributionDtList, // 获取项目成员列表
  erpOmcTaskDistributionEdit, // 编辑
  queryUsersByUsernames, // 部门负责人带入
  erpProgressTemplateDtList, // 进度模板列表
  erpOmcTaskDistributionPaymentNodeList, // 款项进度列表
  erpOmcTaskDistributionPaymentList, // 款项进度列表
  getProcessTaskTransInfo, // 查询流程流转信息
  getProcessHistoryList, // 查询流程图信息
  getProcessHistoryTaskList, // 查询历史流程图信息
  getNodePositionInfo, // 查询坐标信息数据
  rejectProcess, // 退回
  processComplete, // 提交完成
} from '@/api/index.js'
import { BASE_URL } from '@/utils/baseUrl.js'
export default {
  data() {
    return {
      filterMultiDictText,
      initDictOptions,
      dictOptions: {},
      address,
      cust_lxr: 'erp_omc_customer_manager_contact,lxr,id,del_flag=0 and main_id=0',

      tabsList: [
        { name: '基本信息', id: 'outside1' },
        { name: '项目信息', id: 'outside2' },
        { name: '任务信息', id: 'outside3' },
        { name: '项目成员', id: 'outside4' },
        { name: '项目预算', id: 'outside5' },
        { name: '任务进度', id: 'outside6' },
        { name: '款项进度', id: 'outside7' },
        { name: '流程', id: 'outside8' },
      ],
      detailData: {}, // 详情数据
      basicInfo: {
        // 主表信息字段
        单据编号: 'billNo',
        申请时间: 'createTime',
        申请人: 'handlerId',
        申请部门: 'handlerDeptId',
        项目名称: 'projectId',
        项目编号: 'finalNo',
        经营团队: 'takeout_dictText',
        借阅日期: 'borrowDate',
        份数: 'borrowCount',
        借阅事由: 'borrowCause',
        备注: 'remark',
      },
      childFields: {
        项目成员: 'projectMember_dictText',
        '分配合同额(元)': 'contractAmount',
        '合同额占比(%)': 'contractRate',
        '工时单价（元）': 'dayCost',
        '预算工时（人天）': 'expectWorkTime',
        '项目绩效（元）': 'projectPerformance',
        '人工成本（元）': 'laborCost',
      }, // 子表字段
      childArr: [],
      childProgressFields: {
        节点名称: 'nodeName',
        节点进度: 'nodeProgress',
      }, // 子表字段
      progressVoList: [], // 任务进度列表
      progressNodeVoList: [], // 款项进度列表
      childProgressNodeFields: {
        款项名称: 'nodeName',
        '金额(元)': 'paymentMoney',
        款项节点说明: 'nodeDesc',
        是否关联任务: 'isRelatedTask',
        是否关联进度: 'isRelatedTaskNode',
        任务进度: 'taskNodeId_dictText',
      }, // 子表字段

      resultList: [], // 流程图数据
      nodePositionInfo: {}, // 坐标信息
      processInstanceId: '',
      scrollTop: 0, // 滚动顶部距离
      model: {}, // 处理单据表信息
      resultObj: {}, // 流程图流转信息
      nodeObj: {}, // 流程节点信息
      tabvalue: '', // 协同首页tabs name
      // childSource: [], // 子表数据
      isClick: false,

      maxHeight1: 0,
      uId1: uni.$u.guid(),
      maxHeight2: 0,
      uId2: uni.$u.guid(),
      maxHeight3: 0,
      uId3: uni.$u.guid(),
      maxHeight4: 0,
      uId4: uni.$u.guid(),
			id: '',
			// 代码生成后需手动设置流程编码
			flowCode: 'dev_erp_omc_task_distribution_001',
			applyType: ''
    }
  },
  components: {
    actionCollapse,
    detailInformationList,
    fileList,
    collapse,
    defaultList,
    flowList,
  },
  onPageScroll(e) {
    this.scrollTop = e.scrollTop
  },
	onReady() {
		var title = '任务委托单单据详情'
		if (this.applyType && this.applyType == 2) {
			title = '任务委托变更单单据详情'
		}
	  uni.setNavigationBarTitle({
	    title: title,
	  })
	},
  onLoad(options) {
		this.applyType = options.applyType || ''
    if (options.applyType && options.applyType == 2) {
			this.flowCode = 'dev_erp_omc_task_distribution_002'
		}
    this.initDictConfig()
    var that = this
		this.id = options.id || ''
		that.loadData(options.id)
		this.getViewTrack()
		// that.getNodePositionInfoData(that.model.processInstanceId)
  },
  methods: {
    // 查询流程流转信息 -- 获取下一节点信息
    getProcessTaskTrans(taskId) {
      getProcessTaskTransInfo({ taskId })
        .then((res) => {
          if (res.success) {
            this.resultObj = res.result
          } else {
            this.$refs.uToast.show({
              message: res.message,
              type: 'error',
            })
          }
        })
        .catch((err) => {
          console.log(err)
        })
    },
    // 查询任务委托详情
    async loadData(id) {
      erpOmcTaskDistributionId({ id }).then(async (res) => {
        if (res.success) {
          this.detailData = await res.result
          this.projectNumber(res.result.projectId)
          this.taskNumber(res.result.taskId)
          this.getMemberList(res.result.id)
          this.getTemplateDtList(res.result.id) // 获取任务进度模板
          this.queryPaymentNodeListByMainId(res.result.id) // 获取款项进度列表
          this.cust_lxr = (await "erp_omc_customer_manager_contact,lxr,id,del_flag=0 and main_id='") + res.result.ownerUnit + "'"
          // 联系人
          initDictOptions(this.cust_lxr).then((res) => {
            if (res.success) {
              this.$set(this.dictOptions, 'contacts', res.result)
            }
          })
          var arr = await res.result.areaCode.split(',')
          var addressDetail = await ''
          this.address.map((value) => {
            if (arr[0] && value.code == arr[0]) {
              addressDetail = value.name
              value.children.map((val) => {
                if (arr[1] && val.code == arr[1]) {
                  addressDetail = addressDetail + val.name
                  val.children.map((item) => {
                    if (arr[2] && item.code == arr[2]) {
                      addressDetail = addressDetail + item.name
                    }
                  })
                }
              })
            }
          })
          res.result.addressDetail = addressDetail + res.result.projectAddress
          this.timer = setTimeout(() => {
            this.$nextTick(() => {
              uni
                .createSelectorQuery()
                .select('#' + this.uId1)
                .boundingClientRect((data) => {
                  this.maxHeight1 = data.height
                })
                .exec()
              uni
                .createSelectorQuery()
                .select('#' + this.uId2)
                .boundingClientRect((data) => {
                  this.maxHeight2 = data.height
                })
                .exec()
              uni
                .createSelectorQuery()
                .select('#' + this.uId3)
                .boundingClientRect((data) => {
                  this.maxHeight3 = data.height
                })
                .exec()
              uni
                .createSelectorQuery()
                .select('#' + this.uId4)
                .boundingClientRect((data) => {
                  this.maxHeight4 = data.height
                })
                .exec()
            })
            clearTimeout(this.timer)
            this.timer = null
          }, 300)
        } else {
          this.$refs.uToast.show({
            message: res.message,
            type: 'error',
          })
        }
      })
    },

    // 获取项目编号
    projectNumber(projectId) {
      erpOmcProjectId({ id: projectId }).then((res) => {
        if (res.success) {
          this.$set(this.detailData, 'finalNo', res.result.finalNo) // 项目编号
        } else {
          this.$refs.uToast.show({
            message: res.message,
            type: 'error',
          })
        }
      })
    },
    // 获取任务编号
		taskNumber(taskId) {
			if (!taskId) {
			  return false
			}
		  http.get('/api/erp/omc/project/erpOmcProjectTask/queryById', { id: taskId }).then((res) => {
		    if (res.success) {
		      var event = res.result
		      this.$set(this.detailData, 'taskNo', event.billNo?event.billNo: taskId) // 任务编号
		    } else {
					this.$set(this.detailData, 'taskNo', taskId) // 任务编号
		      this.$refs.uToast.show({
		        message: res.message,
		        type: 'error',
		      })
		    }
		  }).catch(err => {
				this.$set(this.detailData, 'taskNo', taskId) // 任务编号
			})
		},

    // 获取项目成员列表
    getMemberList(mainId) {
      erpOmcTaskDistributionDtList({ mainId }).then((res) => {
        if (res.success) {
          initDictOptions('erp_employee_file,name,id').then((resq) => {
            if (res.success) {
              this.$set(this.dictOptions, 'projectMember', resq.result)
              ;(res.result.projectMember_dictText = this.dictOptions['projectMember']), res.result.projectMember + ''
              this.childArr = res.result || []
            }
          })
        } else {
          this.$refs.uToast.show({
            message: res.message,
            type: 'error',
          })
        }
      })
    },
		
		// 获取编辑进度模板
		getTemplateDtList(id) {
		  http.get('/api/erp/omc/task/erpOmcTaskDistribution/queryTaskNodeListByMainId',{ id }).then((res) => {
		    if (res.success) {
		      if (res.result && res.result.length) {
		        res.result.map((value) => {
		          if (value.nodeProgress) {
		            value.nodeProgress = value.nodeProgress + '%'
		          } else {
		            value.nodeProgress = '0%'
		          }
		          return value
		        })
		      }
		      this.progressVoList = res.result
		    } else {
		      this.progressVoList = []
		    }
		  })
		},

    // 获取款项进度列表
    queryPaymentListByProjectId(taskId) {
      erpOmcTaskDistributionPaymentList({ taskId }).then((res) => {
        if (res.success) {
          this.progressNodeVoList = res.result
        } else {
          this.progressNodeVoList = []
        }
      })
    },
    // 编辑获取款项进度列表
    queryPaymentNodeListByMainId(id) {
      if (!id) {
        return false
      }
      erpOmcTaskDistributionPaymentNodeList({ id }).then((res) => {
        if (res.success) {
          if (res.result && res.result.length) {
            res.result.map((item) => {
              if (item.isRelatedTask === '' || item.isRelatedTask === null || item.isRelatedTask === undefined) {
                item.isRelatedTask = ''
              } else if (item.isRelatedTask == 0) {
                item.isRelatedTask = '否'
              } else {
                item.isRelatedTask = '是'
              }
              if (item.isRelatedTaskNode === '' || item.isRelatedTaskNode === null || item.isRelatedTaskNode === undefined) {
                item.isRelatedTaskNode = ''
              } else if (item.isRelatedTaskNode == 0) {
                item.isRelatedTaskNode = '否'
              } else {
                item.isRelatedTaskNode = '是'
              }
              return item
            })
          }
          this.progressNodeVoList = res.result
        } else {
          this.queryPaymentListByProjectId(this.detailData.taskId) // 获取款项进度列表
        }
      })
    },
		getViewTrack () {
			let params = {
				flowCode: this.flowCode, dataId: this.id
			}
			http.get('/api/erpmng/act/process/extActProcessNode/getBizHisProcessNodeInfo', params).then((res) => {
				if (res.success) {
					this.getNodePositionInfoData(res.result.procInsId)
				}
			})
		},
    // 查询流程节点信息 -- 流程图数据
    getProcessHistoryListS(processInstanceId) {
      var url = ''
      var params = ''
      url = getProcessHistoryList
      params = {
        processInstanceId: processInstanceId,
      }

      url(params).then((res) => {
        if (res.success) {
          this.resultList = res.result.records
        } else {
          this.$refs.uToast.show({
            message: res.message,
            type: 'error',
          })
        }
      })
    },
    // 查询坐标信息数据 -- 流程图备注
    getNodePositionInfoData(processInstanceId) {
      getNodePositionInfo({ processInstanceId }).then((res) => {
          if (res.success) {
            this.nodePositionInfo = res.result
            this.getProcessHistoryListS(processInstanceId)
          } else {
            this.$refs.uToast.show({
              message: res.message,
              type: 'error',
            })
          }
        })
        .catch((e) => {
          console.error(e)
        })
    },
    // 流程图预览
    flowView() {
      var params = `_t=${Date.parse(new Date()) / 1000}&processInstanceId=${this.model.processInstanceId}`
      var url = `${BASE_URL}/api/erpmng/act/task/traceImage?${params}`
      this.viewImage(url)
    },
    // 预览图片
    viewImage(url) {
      uni.previewImage({
        urls: [url],
        longPressActions: {
          itemList: ['保存图片'],
          success: function (data) {
            uni.downloadFile({
              url: url,
              success: (result) => {
                if (result.statusCode === 200) {
                  //文件保存到本地
                  uni.saveFile({
                    tempFilePath: result.tempFilePath, //临时路径
                    success: function (ress) {
                      uni.showToast({
                        icon: 'none',
                        mask: true,
                        title: '文件已保存：' + ress.savedFilePath, //保存路径
                        duration: 3000,
                      })
                    },
                  })
                }
              },
              fail: (err) => {
                uni.showToast({
                  icon: 'none',
                  mask: true,
                  title: '失败请重新下载',
                })
              },
            })
          },
          fail: function (err) {
            console.log(err.errMsg)
          },
        },
      })
    },
    // 点击tabs
    onTabClick(item) {
      uni
        .createSelectorQuery()
        .in(this)
        .select(`#${item.id}`)
        .boundingClientRect((data) => {
          uni.pageScrollTo({
            scrollTop: data.top + this.scrollTop - 54,
            duration: 150,
          })
        })
        .exec()
    },

    async initDictConfig() {
      // 人员名称
      initDictOptions('erp_employee_file,name,id').then((res) => {
        if (res.success) {
          this.$set(this.dictOptions, 'handlerId', res.result)
          this.$set(this.dictOptions, 'undertaker', res.result)
          this.$set(this.dictOptions, 'minister', res.result)
          this.$set(this.dictOptions, 'projectLeading', res.result)
          this.$set(this.dictOptions, 'approvalEngineer', res.result)
          this.$set(this.dictOptions, 'projectMember', res.result)
        }
      })
      // 部门名称
      initDictOptions('sys_depart,depart_name,id').then((res) => {
        if (res.success) {
          this.$set(this.dictOptions, 'handlerDeptId', res.result)
          this.$set(this.dictOptions, 'executeDepart', res.result)
        }
      })
      // 团队名称
      initDictOptions('erp_omc_team_manager,alias_name,id').then((res) => {
        if (res.success) {
          this.$set(this.dictOptions, 'teamName', res.result)
          this.$set(this.dictOptions, 'productTeam', res.result)
        }
      })
      // 单位
      initDictOptions('erp_company_files,file_name,id').then((res) => {
        if (res.success) {
          this.$set(this.dictOptions, 'signUnit', res.result)
        }
      })
      // 业主单位
      initDictOptions('erp_purchase_supplier,enterprise_name,id').then((res) => {
        if (res.success) {
          this.$set(this.dictOptions, 'ownerUnit', res.result)
        }
      })

      // 项目来源
      initDictOptions('xmly_type').then((res) => {
        if (res.success) {
          this.$set(this.dictOptions, 'projectSource', res.result)
        }
      })
      // 任务类型
      initDictOptions('task_type').then((res) => {
        if (res.success) {
          this.$set(this.dictOptions, 'taskType', res.result)
        }
      })
      // 审批级别
      initDictOptions('approval_level').then((res) => {
        if (res.success) {
          this.$set(this.dictOptions, 'approvalLevel', res.result)
        }
      })
      // 行业类别
      initDictOptions('industry_category').then((res) => {
        if (res.success) {
          this.$set(this.dictOptions, 'industryCategory', res.result)
        }
      })
      // 复杂程度
      initDictOptions('industry_coefficient').then((res) => {
        if (res.success) {
          this.$set(this.dictOptions, 'complexity', res.result)
        }
      })
      // 是否出具报告
      initDictOptions('YES_OR_NO').then((res) => {
        if (res.success) {
          this.$set(this.dictOptions, 'isOutReport', res.result)
        }
      })
      // 是否出具报告
      initDictOptions('expense_accounting_method').then((res) => {
        if (res.success) {
          this.$set(this.dictOptions, 'expenseAccountingMethod', res.result)
        }
      })
    }
  },
}
</script>
<style lang="scss" scoped>
@import "@/pages/synergy/common/action.scss";
.task_lists {
  padding: 20rpx 20rpx 0;
}
.image_lists {
  padding: 0 0 12rpx 12rpx;
  display: flex;
  flex-wrap: wrap;
  .image_list {
    margin-bottom: 20rpx;
    width: 144rpx;
    margin-right: 14rpx;
    .image_img {
      width: 116rpx;
      height: 116rpx;
      padding: 12rpx;
      background: rgba(0, 0, 0, 0.02);
      border-radius: 1px;
      border: 1px solid rgba(0, 0, 0, 0.08);
      position: relative;
      .image_action {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translateX(-50%) translateY(-50%);
        width: 36rpx;
        height: 36rpx;
      }
      .image_source {
        width: 100%;
        height: 100%;
      }
    }
    .image_name {
      font-size: 20rpx;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: #b2b2b2;
      line-height: 28rpx;
      margin-top: 8rpx;
      text-align: left;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      width: 152rpx;
    }
  }
}

.flow_right {
  display: flex;
  align-items: center;
  image {
    width: 40rpx;
    height: 40rpx;
  }
  text {
    font-size: 14px;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: #1e6fff;
    line-height: 40rpx;
    margin-left: 4rpx;
  }
}

.task_bottom {
  display: flex;
  align-items: center;
  padding: 20rpx 0 20rpx 52rpx;
  background-color: #ffffff;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  .task_bottom_write {
    display: flex;
    align-items: center;
    image {
      width: 48rpx;
      height: 48rpx;
      margin-right: 8rpx;
    }
    text {
      font-size: 28rpx;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: #7f7f7f;
      line-height: 40rpx;
    }
  }
  .refuse {
    width: 168rpx;
    height: 90rpx;
    line-height: 90rpx;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10rpx;
    margin: 0 16rpx 0 52rpx;
    font-size: 34rpx;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.5);
    text-align: center;
  }
  .agree {
    width: 318rpx;
    height: 90rpx;
    line-height: 90rpx;
    background: #1e6fff;
    border-radius: 10rpx;
    font-size: 34rpx;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: #ffffff;
    text-align: center;
  }
}
</style>
